<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>列表</title>
    <link rel="stylesheet" href="../js/element-ui/lib/theme-chalk/index.css">

</head>
<body>
<div id="app">
    <el-button type="success">success</el-button>
       <table>
           <tr v-for="(item,index) in list">
               <td>{{index+1}}</td>
               <td>{{item.name}}</td>
           </tr>

       </table>
</div>
</body>
<script src="../js/vue.js"></script>
<script src="../js/jquery.js"></script>
<script src="../js/element-ui/lib/index.js"></script>

<script>

    var app = new Vue({
        el: '#app',
        data: {
            list: []
        }, mounted() {
            var _this = this;
             $.ajax({
                 url:'http://localhost:3000/hr/list',
                 method:'get',
                 dataType:'json',
                 success:function (data) {
                     _this.list = data;
                 }
             })
        }
    })


</script>
</html>